package thinkingJava.chapter12;

public class Switch {
	private boolean state = false;
	public boolean getState() {
		return state;
	}
	public void on() {
		state = true;
		print(this);
	}
	public void off() {
		state = false;
		print(this);
	}
	public static void print(Object o) {
		System.out.println(o);
	}
	public String toString() {
		return this.getClass().getSimpleName() + ".state : " + this.state;
	}
	public static void main(String[] args) {

	}
}
